var treedata = [{
    "id": 1,
    "text": "Folder1",
    "iconCls": "icon-ok",
    "children": [{
        "id": 2,
        "text": "File1",
        "checked": true
    }, {
        "id": 3,
        "text": "Folder2",
        "state": "open",
        "children": [{
            "id": 4,
            "text": "File3",
            "attributes": {
                "p1": "value1",
                "p2": "value2"
            },
            "checked": true,
            "iconCls": "icon-reload"
        }, {
            "id": 8,
            "text": "Async Folder",
            "state": "closed"
        }]
    }]
}, {
    "text": "Languages",
    "state": "closed",
    "children": [{
        "id": "j1",
        "text": "Java"
    }, {
        "id": "j2",
        "text": "C#"
    }]
}];
var datagrid_data = {
    "total": 28,
    "rows": [{
        "productid": "FI-SW-01",
        "unitcost": 10.00,
        "status": "P",
        "listprice": 36.50,
        "attr1": "Large",
        "itemid": "EST-1"
    }, {
        "productid": "K9-DL-01",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 18.50,
        "attr1": "Spotted Adult Female",
        "itemid": "EST-10"
    }, {
        "productid": "RP-SN-01",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 28.50,
        "attr1": "Venomless",
        "itemid": "EST-11"
    }, {
        "productid": "RP-SN-01",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 26.50,
        "attr1": "Rattleless",
        "itemid": "EST-12"
    }, {
        "productid": "RP-LI-02",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 35.50,
        "attr1": "Green Adult",
        "itemid": "EST-13"
    }, {
        "productid": "FL-DSH-01",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 158.50,
        "attr1": "Tailless",
        "itemid": "EST-14"
    }, {
        "productid": "FL-DSH-01",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 83.50,
        "attr1": "With tail",
        "itemid": "EST-15"
    }, {
        "productid": "FL-DLH-02",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 63.50,
        "attr1": "Adult Female",
        "itemid": "EST-16"
    }, {
        "productid": "FL-DLH-02",
        "unitcost": 12.00,
        "status": "P",
        "listprice": 89.50,
        "attr1": "Adult Male",
        "itemid": "EST-17"
    }, {
        "productid": "AV-CB-01",
        "unitcost": 92.00,
        "status": "P",
        "listprice": 63.50,
        "attr1": "Adult Male",
        "itemid": "EST-18"
    }]
}


var MainIndex = {
    Objects: {
        treeData: []
    },
    Init: function() {
        MainIndex.InitTree();
      
    },
    InitTree: function() {

        var tree = $("#combotree");
        tree.combotree({
            url: "data/tree_data.json",
            data: treedata
        });
    }
    
};
jQuery(function($) {
    MainIndex.Init();
});
